<?php
class Changjing extends MOD{
	
	function __construct() 
	{	
		global $db;
		$this->db = &$db;
		global $cu;
		$this->cu = &$cu;
		global $api;
		$this->api = &$api;
	}

	function newchangjing($data){
		$data['uid'] = $this->cu['uid'];
		$this->db->insert(DB_PRE.'changjing', $data);
	}

	function newduihua($data){
		$data['uid'] = $this->cu['uid'];
		$data['uname'] = $this->cu['name'];
		$data['time'] = time();
		$this->db->insert(DB_PRE.'duihua', $data);
		$this->api->cash_subapple(DUIHUA_APPLE);
	}
}
?>